EXEC1   =  emulator
EXEC2		=  trace
OBJS1   =  emulator.o packet.o
OBJS2   =  trace.o packet.o
CC      =  g++
CFLAGS  =  -Wall -c -std=gnu++0x -g

all: $(EXEC1) $(EXEC2)

$(EXEC1): $(OBJS1)
	$(CC) $(OBJS1) -o $(EXEC1)

$(EXEC2): $(OBJS2)
	$(CC) $(OBJS2) -o $(EXEC2)

packet.o: packet.h packet.cpp
	$(CC) $(CFLAGS) packet.cpp

emulator.o: emulator.cpp
	$(CC) $(CFLAGS) emulator.cpp

trace.o: trace.cpp
	$(CC) $(CFLAGS) trace.cpp

.PHONY: clean

clean:
	rm -f *.o *~ trace emulator
